<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        let arr=Array.of(11,2,3,4,5,6);
        arr["yuan"]="lei"
        for(let i=0;i<arr.length;i++){
            console.log(i+": "+arr[i]);
        }
        arr.forEach(function(v,i){
            console.log(i+": "+v);
        })
        for (let k in arr){
            console.log(k+": "+arr[k]);
        }

        for(let v of arr){
            console.log(v);
        }

        let narr=arr.map(function(v,i){
            console.log(i+": "+v);
            return v=v*v;
        })
        console.log(narr);

           
    
    </script>
</body>
</html>